@import 'reset';

$fontSize: 37.5;

// 1rem = fontSize px
// 1px = (1 / fontSize) rem
@function px2rem($px) {
    @return ($px / $fontSize)+rem;
}

@mixin center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon {
    color: #333;
    font-size: px2rem(20)
}

.slide-down-enter,
.slide-down-leave-to {
    transform: translate3d(0, -100%, 0);
}

.slide-down-enter-to,
.slide-down-leave,
.slide-up-enter-to,
.slide-up-leave {
    transform: translate3d(0, 0, 0);
}

.slide-down-enter-active,
.slide-down-leave-active,
.slide-up-enter-active,
.slide-up-leave-active {
    transition: all 0.3s linear;
}

.slide-up-enter,
.slide-up-leave-to {
    // transform: translate3d(0, 100%, 0);
    // 这里为了修复菜单栏和设置栏动画效果，而让位置高度设置为二者之和
    transform: translate3d(0, px2rem(108), 0);
}

// .slide-down-enter,
// .slide-down-leave-to {
//     transform: translate3d(0, -100%, 0);
// }

// .slide-down-enter-to,
// .slide-down-leave {
//     transform: translate3d(0, 0, 0);
// }

// .slide-down-enter-active,
// .slide-down-leave-active {
//     transition: all 0.3s linear;
// }

// // 底部设置栏
// .slide-up-enter,
// .slide-up-leave-to {
//     transform: translate3d(0, px2rem(108), 0);
// }

// .slide-up-enter-to,
// .slide-up-leave {
//     transform: translate3d(0, 0, 0);
// }

// .slide-up-enter-active,
// .slide-up-leave-active {
//     transition: all 0.3s linear;
// }

// 目录从右边淡入淡出
.slide-right-enter,
.slide-right-leave-to {
    transform: translate3d(-100%, 0, 0);
}

.slide-right-enter-to,
.slide-right-leave {
    transform: translate3d(0, 0, 0);
}

.slide-right-enter-active,
.slide-right-leave-active {
    transition: all .3s linear;
}

// 目录右边遮盖
.fade-enter,
.fade-leave-to {
    opacity: 0;
}

.fade-enter-to,
.fade-leave {
    opacity: 1;
}

.fade-enter-active,
.fade-leave-active {
    transition: all 0.3s linear;
}